home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 2000 October: Mac OS SDK / Dev.CD Oct 00 SDK1.toast / Development Kits / Cross Platform / QuickTime 4.1.2 Windows SDK / CIncludes / AGP.h < prev    next >
Encoding:
C/C++ Source or Header  |  2000-04-12  |  3.8 KB  |  173 lines  |  [TEXT/R*ch]

  1. /*
  2.      File:        AGP.h
  3.  
  4.      Contains:    API for Accelerated Graphics Port (AGP)
  5.  
  6.      Version:    Technology:    1.0
  7.                  Release:    QuickTime 4.1
  8.  
  9.      Copyright:    (c) 1999 by Apple Computer, Inc., all rights reserved.
  10.  
  11.      Bugs?:        For bug reports, consult the following page on
  12.                  the World Wide Web:
  13.  
  14.                      http://developer.apple.com/bugreporter/
  15.  
  16. */
  17. #ifndef __AGP__
  18. #define __AGP__
  19.  
  20. #ifndef __CONDITIONALMACROS__
  21.     #include <ConditionalMacros.h>
  22. #endif
  23.  
  24. #ifndef __MACTYPES__
  25.     #include <MacTypes.h>
  26. #endif
  27.  
  28.  
  29.  
  30.  
  31. #if PRAGMA_ONCE
  32. #pragma once
  33. #endif
  34.  
  35. #ifdef __cplusplus
  36. extern "C" {
  37. #endif
  38.  
  39. #if PRAGMA_IMPORT
  40. #pragma import on
  41. #endif
  42.  
  43. #if PRAGMA_STRUCT_ALIGN
  44.     #pragma options align=power
  45. #elif PRAGMA_STRUCT_PACKPUSH
  46.     #pragma pack(push, 2)
  47. #elif PRAGMA_STRUCT_PACK
  48.     #pragma pack(2)
  49. #endif
  50.  
  51. /* AGP related property names*/
  52. #define kAGPMasterProperty "AGP_Master"
  53. #define kAGPTargetProperty "AGP_Target"
  54. #define kAGPAddressRange "AGP_Address_Range"
  55. #define kAGPAddressBlock "AGP_Address_Block"
  56. #define kAGPAlignment "AGP_Alignment"
  57. #define kAGPAllowOverlap "AGP_AllowOverlap"
  58. #define kAGPMajorRevision "AGP_MajorRevision"
  59. #define kAGPMinorRevision "AGP_MinorRevision"
  60. #define kAGPDepth "AGP_Depth"
  61. #define kAGPSBASupport "AGP_SBA_Support"
  62. #define AGPTransferType "AGP_Transfer_Type"
  63. #define kAGPFourGig "AGP_4Gig_Enabled"
  64. #define kAGPFastWrite "AGP_FastWrite_Enabled"
  65. #define kAGPEnabled "AGP_Enabled"
  66.  
  67.  
  68. /* AGP Capabilities Register definitions*/
  69. enum {
  70.                                                                 /* AGP Register Offsets*/
  71.     kAGPRevisionOffset            = 0x02,
  72.     kAGPStatusOffset            = 0x04,
  73.     kAGPCommandOffset            = 0x08,                            /* Major/Minor Rev Bits*/
  74.     kAGPMinorRevMask            = 0x0F,
  75.     kAGPMajorRevMask            = 0xF0,
  76.     kAGPMinorRevBit                = 0x00,
  77.     kAGPMajorRevBit                = 0x04,                            /* AGP Status Register definitions*/
  78.     kAGPDataRateMask            = 0x00000003,
  79.     kAGPFastWriteMask            = 0x00000010,
  80.     kAGPFourGigAddrMask            = 0x00000020,
  81.     kAGPSideBandAddrMask        = 0x00000200,
  82.     kAGPRequestDepthMask        = (long)0xFF000000,
  83.     kAGPDataRateBit                = 0x00,
  84.     kAGPFastWriteBit            = 0x04,
  85.     kAGPFourGigAddrBit            = 0x05,
  86.     kAGPSideBandAddrBit            = 0x09,
  87.     kAGPRequestDepthBit            = 0x18,                            /* AGP Command Register definitions*/
  88.     kAGPEnableBit                = 0x08,
  89.     kAGPEnableMask                = 0x00000100
  90. };
  91.  
  92. /* AGP Speed definitions*/
  93. enum {
  94.     kAGPOneX                    = 1,
  95.     kAGPTwoX                    = 2,
  96.     kAGPFourX                    = 4
  97. };
  98.  
  99. enum {
  100.     kAGPQueryBaseAddress        = 1,
  101.     kAGPQueryEnabled            = 2,
  102.     kAGPQueryMaxAGPMemory        = 3,
  103.     kAGPQueryFreeAGPMemory        = 4,
  104.     kAGPEnabledStatus            = 1,
  105.     kAGPDisabledStatus            = 0
  106. };
  107.  
  108.  
  109. struct AGPAddressPair {
  110.     LogicalAddress                     systemLogicalAddress;
  111.     LogicalAddress                     agpLogicalAddress;
  112.     UInt32                             internalInfo[4];
  113. };
  114. typedef struct AGPAddressPair            AGPAddressPair;
  115.  
  116. typedef UInt32                             AGPQuery;
  117. EXTERN_API_C( OSStatus )
  118. AGPNewMemory                    (AGPAddressPair *        agpAddressPair,
  119.                                  ByteCount                 byteSize,
  120.                                  Boolean                 clear);
  121.  
  122. EXTERN_API_C( OSStatus )
  123. AGPReserveMemory                (AGPAddressPair *        agpAddressPair,
  124.                                  ByteCount                 byteSize);
  125.  
  126. EXTERN_API_C( OSStatus )
  127. AGPDisposeMemory                (AGPAddressPair *        agpAddress);
  128.  
  129. EXTERN_API_C( OSStatus )
  130. AGPReleaseMemory                (AGPAddressPair *        agpAddress);
  131.  
  132. EXTERN_API_C( OSStatus )
  133. AGPCommitMemory                    (AGPAddressPair *        agpAddress,
  134.                                  Boolean                 agpClientManagesCaches);
  135.  
  136. EXTERN_API_C( OSStatus )
  137. AGPGetAGPLogicalAddress            (AGPAddressPair *        agpAddressPair);
  138.  
  139. EXTERN_API_C( OSStatus )
  140. AGPGetSystemLogicalAddress        (AGPAddressPair *        agpAddressPair);
  141.  
  142. EXTERN_API_C( OSStatus )
  143. AGPGetStatus                    (AGPQuery                 query,
  144.                                  void *                    result);
  145.  
  146. EXTERN_API_C( OSStatus )
  147. AGPDecommitMemory                (AGPAddressPair *        agpAddress);
  148.  
  149. EXTERN_API_C( OSStatus )
  150. AGPRestoreCacheState            (AGPAddressPair *        agpAddress);
  151.  
  152.  
  153. #if PRAGMA_STRUCT_ALIGN
  154.     #pragma options align=reset
  155. #elif PRAGMA_STRUCT_PACKPUSH
  156.     #pragma pack(pop)
  157. #elif PRAGMA_STRUCT_PACK
  158.     #pragma pack()
  159. #endif
  160.  
  161. #ifdef PRAGMA_IMPORT_OFF
  162. #pragma import off
  163. #elif PRAGMA_IMPORT
  164. #pragma import reset
  165. #endif
  166.  
  167. #ifdef __cplusplus
  168. }
  169. #endif
  170.  
  171. #endif /* __AGP__ */
  172.  
  173.